module TaxManager
	class TaxWithMount
		def self.remove_taxes(mount, percentage)
			mount = mount.to_f
			percentage = percentage.to_f
			factor = 100.0 + percentage
			return {
				from: mount,
				tax: percentage,
				result: ((mount / factor) * 100.0).to_i
			}
		end

		def self.add_taxes(mount, percentage)
			mount = mount.to_f
			percentage = percentage.to_f
			return {
				from: mount,
				tax: percentage,
				result: (mount + (mount*(percentage/100.0))).to_i
			}
		end

	end
end

